import request from '@/utils/request'

// 获取所有角色列表
export const reqGetSettingList = (page, pagesize) => request({
  method: 'get',
  url: '/sys/role',
  params: {
    page: page,
    pagesize: pagesize
  }
})

// 新增部门
export const reqAddSetting = data => request({
  method: 'post',
  url: '/sys/role',
  data
})

// 根据ID删除角色
export const reqDelSetting = id => request({
  method: 'delete',
  url: `/sys/role/${id}`
})

// 根据ID获取角色详情
export const reqGetSettingDetail = id => request({
  method: 'get',
  url: `/sys/role/${id}`
})

// 根据ID更新角色
export const reqUpdateSetting = data => request({
  method: 'put',
  url: `/sys/role/${data.id}`,
  data
})

